import Layout from '../layouts/Index.vue'

const layoutMap = [
  {
    path: '/dashboard',
    name: 'Dashboard',
    META: { title: '首页', icon: 'role' },
    component: () => import('../views/Dashboard.vue'),
    children: [],
  },
  {
    path: '/network',
    name: 'Network',
    meta: { title: '网口设置', icon: 'network' },
    component: () => import('../views/networkService/Network.vue'),
    children: [],
  },
  {
    path: '/mobile',
    name: 'Mobile',
    meta: { title: '移动网络', icon: 'mobile' },
    component: () => import('../views/networkService/Mobile.vue'),
    children: [],
  },
  {
    path: '/:w+',
    hidden: true,
    redirect: { name: 'NotFound' },
  },
]

const routes = [
  {
    path: '/',
    redirect: { name: 'Dashboard' },
  },
  {
    path: '/layout',
    name: 'Layout',
    component: Layout,
    redirect: { name: 'Test1' },
    children: [...layoutMap],
  },
]

export { routes, layoutMap }
